# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libqaccessibilityclient
pkgver=0.4.1
pkgrel=1
pkgdesc="Accessibilty tools helper library, used e.g. by screen readers"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/libraries/libqaccessibilityclient"
license="LicenseRef-KDE-Accepted-LGPL AND LGPL-2.1-only AND LGPL-3.0-only"
makedepends="
	extra-cmake-modules
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/libqaccessibilityclient/libqaccessibilityclient-$pkgver.tar.xz"
subpackages="$pkgname-dev"
options="!check" # Requires running DBus server

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="d5c168ff39f4bb67f18120eea50f8e02a85d464a5bb6479c48dfdb02ea9bf0cc379cbed4da7d882b718a1e1723d3a00528fcb26903b617b43029fde25e82cb3c  libqaccessibilityclient-0.4.1.tar.xz"
